package com.neuedu.it.teach.dao;

import com.neuedu.it.teach.entity.Help;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface HelpDao {

    void insertHelp(Help help);

    boolean updateHelp(Integer helpId,String status);

    void deleteHelp(@Param("helpId") Integer helpId);

    Help queryHelp(Help help);

    Help queryHelpByUserId(@Param("userId") Integer userId);

    Help queryHelpByHelpId(@Param("helpId") Integer helpId);

    Help queryHelpByStatus(@Param("status") String status);


    // 额外的方法：获取所有状态为pending的互助信息
    List<Map<String, Object>> getAllPendingHelp();


    boolean updateHelp(Help help);
}